package com.zhangfb95.crosschain.console.command;

import com.zhangfb95.crosschain.console.enums.CommandEnum;
import org.springframework.stereotype.Component;

/**
 * @author zhangfubing
 * @since 2023/12/21
 */
@Component
public class ExitCommand implements Command {

    @Override
    public CommandEnum command() {
        return CommandEnum.EXIT;
    }

    @Override
    public boolean handle(String[] args) {
        if (isHelp(args)) {
            System.out.println("Usage: exit");
            return false;
        }
        System.out.println("bye");
        return true;
    }
}
